﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using YasharEl.Infrastructure.PersistenceModel.NHibernate.Specifications;
using BneyBaruch.Technology.SourcesRepository.PersistenceModel.Specifications;
using NHibernate.Criterion;

namespace BneyBaruch.Technology.SourcesRepository.PersistenceModel.NHibernate.Specifications
{
    public class AuthorCriteriaSpecification : CriteriaSpecification<IAuthor,long>, IAuthorSpecification
    {
        #region IAuthorSpecification Members

        public IAuthorSpecification WithName(string nameToSearch)
        {
            Criteria.Add(Expression.Eq("AuthorName", nameToSearch));
            return this;
        }

        #endregion
    }
}
